# coding: utf-8
from PySide6.QtCore import QObject, Signal
from PySide6.QtGui import QImage, QColor


class SignalBus(QObject):
    msgSignal = Signal(str, str)
    sysMsgSignal = Signal(str)

    micaWallpaperChanged = Signal(QImage)

    infoSignal = Signal(object, str)  # 源，url
    photoSignal = Signal(object, object)  # item, List[item]
    webUrlSignal = Signal(object)  # 网页url
    # thread
    threadStartSignal = Signal()  # 线程启动信号
    threadFinishSignal = Signal()  # 线程结束信号
    # 书架
    addBookSignal = Signal(object)  # 增加书籍信号
    removeBookSignal = Signal(object)  # 删除书籍信号
    # 插件相关
    homeChangedSignal = Signal(object)  # 插件主页变化信号
    # 背景图片
    wallpaperEnabledChanged = Signal(bool)  # 切换背景图信号
    wallpaperChanged = Signal(str)  # 背景图路径信号
    wallpaperBlurRadiusChanged = Signal(int)  # 背景图模糊度信号
    wallpaperOpacityChanged = Signal(int)  # 背景图透明度信号
    wallpaperLightColorChanged = Signal(QColor)  # 背景图亮色信号
    wallpaperDarkColorChanged = Signal(QColor)  # 背景图暗色信号


signalBus = SignalBus()
